Fix hypervisor crash with unpopulated NUMA nodes
On NUMA systems with memory-less nodes Xen crashes quite early in the
hypervisor (while initializing the heaps). This is not an issue if
this happens to be the last node, but "inner" nodes trigger this
reliably. On multi-node processors it is much more likely to leave a
node unequipped. The attached patch fixes this by enumerating the
node via the node_online_map instead of counting from 0 to num_nodes.
The resulting NUMA setup is still somewhat strange, but at least it
does not crash. In lowlevel/xc/xc.c there is again this enumeration
bug, but I suppose we cannot access the HV's node_online_map from this
context, so the xm info output is not correct (but xm debug-keys H
is). I plan to rework the handling of memory-less nodes later.
Signed-off-by: Andre Przywara <andre.przywara@amd.com>